#include<iostream>
#include<map>
#include<set>

using namespace std;


void printMap(const map<int,int>& m){
	
	for(map<int,int>::const_iterator it=m.begin(); it!=m.end(); it++){
		
		cout<<"key = "<<it->first<<" "<<"value = "<<it->second<<endl;
	}
	cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

}


int main(){
	
	map<int,int> m1;
	cout<<"m1:"<<endl;
	printMap(m1);

	map<int,int>m2_1={
		pair<int,int> (1,10),
		pair<int,int> (4,24),
		pair<int,int> (3,12),
		pair<int,int> (2,10)
	};

	cout<<"m2_1:"<<endl;
	printMap(m2_1);

	
	map<int,int>m2_2={
                pair<int,int> (1,19),
                pair<int,int> (4,24),
                pair<int,int> (3,12),
                pair<int,int> (2,14)
        };

        cout<<"m2_2:"<<endl;
        printMap(m2_2);

	map<int,int>m3(m2_1.begin(),m2_1.end());
	cout<<"m3:"<<endl;
	printMap(m3);

	map<int,int> m4(m2_2);
	cout<<"m4: "<<endl;
	printMap(m4);


	return 0;

}
